package com.example.fashionshoes.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.fashionshoes.exception.BusinessException;
import com.example.fashionshoes.pojo.po.AddressBook;

import java.util.List;

public interface AddressBookService extends IService<AddressBook> {
    /**
     * 新增地址簿
     *
     * @param addressBook 地址簿
     * @return 更新结果
     */
    Boolean insert(AddressBook addressBook);

    /**
     * 获取地址簿信息
     * @return 地址簿信息
     */
    List<AddressBook> getAddress();

    /**
     * 修改默认收货地址
     */
    void updateDefaultAddress(Integer addressId) throws BusinessException;
}
